home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
L' Effet Pommier 3
/
L'Effet Pommier - Volume 03.iso
/
Programmation
/
Gooey1.3.1
/
C++ Templates
/
mmCModalDialog.c
< prev
next >
Wrap
Text File
|
1993-12-17
|
3KB
|
112 lines
$$Message MM Modal Dialog, mm:mmModalDialogObject.cp
$$File mm:mmModalDialogObject.cp
/* mmModalDialogObject */
/* $CopyRight$ */
/* File name: mmModalDialogObject
Function: Basic modal dialog object
History: $Date$ Original by $Author$
*/
#include "mmCommon$Prototype.name$.h" /* Common */
#include "Common$Prototype.name$.h" /* Common */
/* ======================================================= */
/* ======================================================= */
Boolean CmmModalDialog::FilterThisEvent(DialogPtr theDialog,EventRecord *theEvent,short *itemHit)
{
Boolean FilterItOut;
/* Expected to be overridden by the dialog code */
FilterItOut = false;
return(FilterItOut);
}
/* ======================================================= */
void CmmModalDialog::FilterMouseDown(DialogPtr theDialog,EventRecord *theEvent,short *itemHit,Point MyPt)
{
/* Expected to be overridden by the dialog code */
}
/* ======================================================= */
/* Routine: MyFilter */
/* Purpose: Filter routine, also used for initial setup of dimmed states */
pascal Boolean theModalDialogFilter(DialogPtr theDialog,EventRecord *theEvent,short *itemHit)
{
Boolean FilterValue; /* Temporary return value */
Point MyPt;
FilterValue = false;
if (gCurrentModalDialog != nil)
{
FilterValue = gCurrentModalDialog->FilterThisEvent(theDialog,theEvent,itemHit);
/* Only do on an update */
if ((theEvent->what == updateEvt) && ((WindowPtr)theEvent->message == theDialog))
{
BeginUpdate(theDialog); /* Start the update */
DrawDialog(theDialog); /* Draw the controls */
FilterValue = true; /* Pass out this special itemHit number */
*itemHit = 32000; /* Our special ID */
}
if (theEvent->what == mouseDown) /* Only do on a mouse click */
{
MyPt = theEvent->where; /* Get the point where the mouse was clicked */
GlobalToLocal(&MyPt); /* Convert global to local */
gCurrentModalDialog->FilterMouseDown(theDialog,theEvent,itemHit,MyPt);
}
CheckKeysInDialog(theDialog,&FilterValue,theEvent,itemHit);
}
return(FilterValue);
}
/* ======================================================= */
void CmmModalDialog::Init()
{
inherited::Init();
this->theWindow = nil;
this->ExitDialog = false;
/* Expected to be overridden by the dialog code */
}
/* ======================================================= */
void CmmModalDialog::ExtraSetup()
{
/* Expected to be overridden by the dialog code */
}
/* ======================================================= */
void CmmModalDialog::DoItemHit(short *itemHit,Boolean *ExitDialog)
{
/* Expected to be overridden by the dialog code */
}
/* ======================================================= */
void CmmModalDialog::Exit()
{
/* Expected to be overridden by the dialog code */
}
/* ======================================================= */
/* ======================================================= */
$$CloseFile